//
//  UIButton+extension.m
//  HowToDo
//
//  Created by 胡坤 on 2017/1/6.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "UIButton+extension.h"

@implementation UIButton (extension)

+(instancetype)buttonWithBgImgName:(NSString *)imgName
{
   UIButton* btn = [[UIButton alloc]init];
    [btn setBackgroundImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];
    
    return btn;
}

+(instancetype)buttonWithTitle:(NSString*)title NorTitleColor:(UIColor*)norColor SelColor:(UIColor*)selColor ImgName:(NSString*)imgName
{
    UIButton* btn = [[UIButton alloc]init];
    [btn setTitle:title forState:UIControlStateNormal];
    [btn setTitleColor:norColor forState:UIControlStateNormal];
    [btn setTitleColor:selColor forState:UIControlStateSelected];
    [btn setImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];

    return btn;
};
@end
